

namespace NodeBasedSkillEditor.Model.Node.RT
{
    public class Node_Negate_RT : RT_Node
    {
        public RT_SingleValuePort SourceValue_RT;

        public RT_SingleValuePort ResultValue_RT;

        public Node_Negate_RT(Node_Negate sourceData, RT_DAG parentDag) : base(sourceData, parentDag)
        {
            SourceValue_RT = new RT_SingleValuePort(EPortIOType.Input, sourceData.Source, this);

            ResultValue_RT = new RT_SingleValuePort(EPortIOType.Output, sourceData.Result, this);
            ResultValue_RT.OnGetValue = GetResultValue;
        }

        public AValue GetResultValue(DAG_Executor executor)
        {
            ResultValue_RT.SourceValue.Assign(SourceValue_RT.GetValue(executor));
            ResultValue_RT.SourceValue.Negative();
            return ResultValue_RT.SourceValue;
        }
    }
}